package com.wobito.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wobito.pojo.bean.Book;
import com.wobito.pojo.dto.api.GetBookByCabinetDTO;
import com.wobito.pojo.dto.book.BookByQueryNameDTO;
import com.wobito.pojo.dto.book.BookDTO;
import com.wobito.pojo.vo.book.BookVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author Wangbaba
 * @Date 2024/7/1 10:13
 * @Version 1.0
 */
public interface BookMapper extends BaseMapper<Book> {

    List<BookDTO> selectBookList(BookVO bookVO);

    List<BookByQueryNameDTO> selectFileByQueryName(String queryName);

    List<GetBookByCabinetDTO> selectBookByCabinet(Long cabinetId);

    int selectFileNumByRfid(String rfid);

    int selectCountName(Integer code);

    long selectBookNumByCabinet(@Param("cabinetId") Long cabinetId,@Param("state") Integer state);

    int updateQueryNumById(List<Long> ids);
}
